package chapter1.bagqueuestack.example;

import edu.princeton.cs.algs4.StdIn;

import java.util.Stack;

/**
 * @author quanlinlin on 2018/11/27 9:24.
 * @version 1.0
 */
public class Reverse {

    public static void main(String[] args) {
        Stack<Integer> stack;

        stack = new Stack<>();
        while (!StdIn.isEmpty()) {
            stack.push(StdIn.readInt());
        }

        for (Integer i : stack) {
            System.out.println(i);
        }
    }
}
